* Replication code for individual-level analysis


********************************************************************************
************************** SUMMARY PUTIN SUPPORT INDEX *************************
********************************************************************************

* NOTE: questions in the used datasets on Putin's support that were designed to be the dependent variables in experiments (hence expected to be influenced by treatments) and list experiment measures designed to assess Putin's support are not included in this analysis. Questions on whether Putin possesses certain qualities (honesty etc.) are also not included, since they do not directly measure political support as conceptualized in the paper.


****************************2021 RES Datasets: Anti-West, NATO, Putin Reputation


* December 2021 (Refresh RES): Anti-Westernism, NATO Threat, and Putin Reputation

use "Data_Replication_HL24_IS_Dec2021.dta", clear

svyset qTO [pweight=wgt_refresh]

*DVs
generate votput202112=1 if qG7==5
replace votput202112=0 if votput202112==.
recode qG5 (1=1) (2=0) (98=0) (99=0), gen(appputbinx2)
recode qG6 (98=.) (99=.), gen(putinposx11)
generate putinposx2=1 if putinposx11>5 & putinposx11~=.
replace putinposx2=0 if putinposx2==.
recode qG9 (1=0) (2=0) (3=0) (4=1) (98=0) (99=0), gen(puforevx2)
recode qP9E (1=1) (2=1) (3=0) (4=0) (98=0) (99=0), gen(attputx2)
recode qP9E (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(attputx4)

*Creating additive index "proputin" from the 5 binary measures of Putin support 
egen proputin = rowmean(votput202112 appputbinx2 putinposx2 puforevx2 attputx2)

*IVs
recode qP16 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(antiwestx4)
recode qP16 (1=1) (2=1) (3=0) (4=0) (98=0) (99=0), gen(antiwestx2)
recode qN17B (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(usnatothreatx4)
recode qN17B (1=1) (2=1) (3=0) (4=0) (98=0) (99=0), gen(usnatothreatx2)
recode qP18 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(puantiwestx4)
recode qP18 (1=1) (2=1) (3=0) (4=0) (98=0) (99=0), gen(puantiwestx2)

*Controls
recode q103 (2=1) (1=0), gen(female)
generate age=q104
recode q105 (1=0) (2=0) (3=0) (4=0) (5=0) (6=1) (7=1) (8=1) (98=0) (99=0), gen(highedx2)
recode qN19 (1=0) (2=0) (3=0) (4=1) (5=1) (98=0) (99=0), gen(ecpocdownx2)
generate russian=1 if qD4==1
replace russian=0 if russian==.
recode qD6 (1=1) (2=1) (3=0) (4=0) (5=0) (6=0) (7=0) (98=0) (99=0), gen(poorx2)
*Note: TNP not in dataset, so commsize variable not created/included

*Summary regressions

svy: regress proputin antiwestx2 ecpocdownx2 poorx2 age female russian highedx2
eststo: margins, dydx(*)
svy: regress proputin antiwestx4 ecpocdownx2 poorx2 age female russian highedx2
eststo: margins, dydx(*)

svy: regress proputin usnatothreatx2 ecpocdownx2 poorx2 age female russian highedx2
eststo: margins, dydx(*)
svy: regress proputin usnatothreatx4 ecpocdownx2 poorx2 age female russian highedx2
eststo: margins, dydx(*)

svy: regress proputin puantiwestx2 ecpocdownx2 poorx2 age female russian highedx2
eststo: margins, dydx(*)
svy: regress proputin puantiwestx4 ecpocdownx2 poorx2 age female russian highedx2
eststo: margins, dydx(*)



* Summer 2021 (RES Wave 1): : Anti-Westernism, NATO Threat

use "Data_Replication_HL24_IS_Sep2021.dta", clear

svyset qTO [pweight=wgt_wave1]

*DVs
generate votput202109=1 if q39==6
replace votput202109=0 if votput202109==.
recode q20 (1=1) (2=0) (97=0) (98=0), gen(appputbinx2)
recode q21 (98=.) (99=.), gen(putinposx11)
generate putinposx2=1 if putinposx11>5 & putinposx11~=.
replace putinposx2=0 if putinposx2==.

*Creating additive index "proputin" from the 3 binary measures of Putin support 
egen proputin = rowmean(votput202109 appputbinx2 putinposx2)

*IVs
recode q51 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(antiwestx4)
recode q51 (1=1) (2=1) (3=0) (4=0) (98=0) (99=0), gen(antiwestx2)
recode q55_2 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(usnatothreatx4)
recode q55_2 (1=1) (2=1) (3=0) (4=0) (98=0) (99=0), gen(usnatothreatx2)

*Controls
recode q103 (2=1) (1=0), gen(female)
generate age=q104
recode q105 (1=0) (2=0) (3=0) (4=0) (5=0) (6=1) (7=1) (8=1) (98=0) (99=0), gen(highedx2)
recode q60 (1=0) (2=0) (3=0) (4=1) (5=1) (98=0) (99=0), gen(ecpocdownx2)
generate russian=1 if q106==1
replace russian=0 if russian==.
recode q109 (1=1) (2=1) (3=0) (4=0) (5=0) (6=0) (7=0) (98=0) (99=0), gen(poorx2)
recode qRNP (1=5) (2=4) (3=3) (4=2) (5=1), gen(commsize)

*Summary regressions

svy: regress proputin antiwestx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin antiwestx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)

svy: regress proputin usnatothreatx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin usnatothreatx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)


********************* TABLE OA5 (Putin support index as DV, 2021 surveys)

esttab using FRregs2021summaryindex20230817.rtf, compress b(%9.2f) se star(+ 0.1 * 0.05 ** 0.01) coeflabel(antiusx2 "Anti-US x2" antiusx4 "Anti-US x4" antiwestx2 "Anti-West x2" antiwestx4 "Anti-West x4" usnatothreatx2 "US-NATO threat x2" usnatothreatx4 "US-NATO threat x4" puantiwestx2 "Putin is anti-West x2" puantiwestx4 "Putin is anti-West x4" ecpocdownx2 "Pocketbook down" poorx2 "Poor" age "Age" female "Female" commsize "Community size" russian "Russian" highedx2 "Higher education") mtitles("RES 12/21" "RES 12/21" "RES 12/21" "RES 12/21" "RES 12/21" "RES 12/21" "RES 9/21" "RES 9/21" "RES 9/21" "RES 9/21") title("Table X. Average marginal effects of different aspects of anti-Westernism on probability of supporting Putin with economic and demographic controls, OLS") addnote("Dependent variables are indices of all measures of Putin support found in the given survey, constructed by converting each measure to a binary variable and averaging each individual's 'score' across these variables. Included measures of Putin support are: 9/21 - vote intention, job approval, positivity from 11-point scale; 12/21 - vote intention, job approval, positivity on 11-point scale, desire for Putin to remain president for life, and perception Putin is the best politician to manage Russia's international interests. The notation 'x2' refers to a measure of anti-Westernism that codes all people giving anti-Western responses as 1 and codes all others 0, while the notation 'x4' refers to a measure of anti-Westernism that consists of a four-point scale and that drops from the analysis all people who do not pick a number on this scale. The control variables for the economy, sex, nationality, and higher education are binary, coding people who hold the disposition 1 and coding all others 0. The control variable age reports respondents' age in years, and 'community size' consists of the scale supplied by each survey agency on the size of the population center where a respondent lives. All regressions are OLS, but using logit or ordinal logit produces no substantial difference. The same patterns are also found if one breaks down the indices into their component measures of Putin support.") fonttbl(\f0\fnil Times New Roman; ) replace 
eststo clear






*****************************2019 Dataset: Anti-Americanism specifically

use "Data_Replication_HL24_IS_Experiment.dta", clear

svyset psu [pweight=weight]

*Note: commands for creating variables are starred when the variables they create have been pre-saved in dataset

*DVs: support for and attachment to Putin
recode qH5 (1=1) (2=1) (3=0) (4=0) (97=0) (99=0), gen(supputx2)
recode qH5 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(supputx4)
recode qH6 (1=1) (2=1) (3=0) (4=0) (97=0) (99=0), gen(attputx2)
recode qH6 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(attputx4)
recode q2A (1=1) (2=0) (0=0), gen(appputx2)
generate votput19=1 if qQ10_cod==7
replace votput19=0 if votput19==.

*Creating additive index "proputin" from the binary measures of Putin support
egen proputin = rowmean(supputx2 attputx2 appputx2 votput19)

*IV of interest
recode qH3 (1=1) (2=1) (3=0) (4=0) (97=0) (99=0), gen(antiusx2)
recode qH3 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(antiusx4)

*Controls
recode qA1 (1=0) (2=0) (3=1) (9=0), gen(ecpocdownx2)
recode qS1 (1=0) (2=1), gen(female)
*age already in dataset: it is renamed original variable qS2
*educx6 already in dataset: it is renamed original variable qS3 
recode educx6 (1=0) (2=0) (3=0) (4=0) (5=0) (6=1), gen(highedx2)
recode qD8 (0=.) (1=1) (2=1) (3=0) (4=0) (5=0) (6=0), gen(poorx2)
generate russian=1 if qD12==1
replace russian=0 if russian==.
recode qRNP (1=5) (2=4) (3=3) (4=2) (5=1), gen(commsize)

*Summary regressions

svy: regress proputin antiusx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin antiusx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)



*****************************2018 Dataset: Anti-Westernism

use "Data_Replication_HL24_IS_RES_2018.dta", replace

svyset qTO [pweight=qVEC]

*DVs
recode qQ5 (1=5) (2=4) (3=3) (4=2) (5=1) (8=.) (9=.), gen(appputx5)
recode qQ5 (1=1) (2=1) (3=0) (4=0) (5=0) (8=0) (9=0), gen(appputx2)
generate votput18=1 if qD1B==4
replace votput18=0 if votput18==.

egen proputin = rowmean(appputx2 votput18)

*IV
recode qQ3 (1=1) (2=1) (3=0) (4=0) (8=0) (9=0), gen(antiwestx2)
recode qQ3 (1=4) (2=3) (3=2) (4=1) (8=.) (9=.), gen(antiwestx4)

*Controls
recode qRNP (1=5) (2=4) (3=3) (4=2) (5=1), gen(commsize)
recode qS3 (1=0) (2=0) (3=0) (4=0) (5=0) (6=1), gen(highedx2)
recode qQ2 (1=0) (2=0) (3=0) (4=1) (5=1) (8=0) (9=0), gen(ecpocdownx2)
recode qD8 (1=1) (2=1) (3=0) (4=0) (5=0) (6=0) (.=0), gen(poorx2)
generate russian=1 if qD10==1
replace russian=0 if russian==.
recode qS1 (2=1) (1=0), gen(female)
rename qS2 age

*Summary regressions

svy: regress proputin antiwestx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin antiwestx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)



*****************************2016 Dataset: Anti-Westernism

use "Data_Replication_HL24_IS_RES_2016.dta.dta", replace

svyset qTO [pweight=vec]

*DVs
recode q20 (1=1) (2=1) (3=0) (4=0) (5=0) (7=0) (8=0), gen(appputx2)
recode q20 (1=5) (2=4) (3=3) (4=2) (5=1) (7=.) (8=.), gen(appputx5)
recode q25 (1=1) (2=1) (3=1) (4=0) (5=0) (6=0) (7=0) (8=0) (97=0) (98=0), gen(putinposx2)
recode q61E (1=1) (2=1) (3=0) (4=0) (7=0) (8=0) (.=0), gen(attputx2)
recode q61E (1=4) (2=3) (3=2) (4=1) (7=.) (8=.) (.=.), gen(attputx4)
generate votput16=1 if q97==6
replace votput16=0 if votput16==.
generate pubestirx2=1 if q107==4
replace pubestirx2=0 if pubestirx2==.
recode q134 (1=1) (2=0) (3=0) (4=0) (7=0) (8=0) (.=0), gen(puforevx2)
recode q24 (97=.) (98=.), gen(trustputx11)
generate trustputx2=1 if trustputx11>5 & trustputx11~=.
replace trustputx2=0 if trustputx2==.

*Creating additive index "proputin" from the 6 binary measures of Putin support 
egen proputin = rowmean(appputx2 putinposx2 attputx2 votput16 pubestirx2 puforevx2 trustputx2)

*Creating index "proputin2" from the 6 binary measures of Putin support using factor analysis 
factor appputx2 putinposx2 attputx2 votput16 pubestirx2 puforevx2 trustputx2
rotate
predict proputin2 factor2

correlate proputin proputin2

*These two proputin indices are correlated at .95 (.98 if the binary trust variable is not included), so are almost completely interchangeable. The simpler rowmean version (proputin) is thus used in the analysis. This informs the choice to use a rowmean index to summarize the other results in this study.


*IVs of interest
recode q114 (1=1) (2=1) (3=0) (4=0) (7=0) (8=0), gen(antiwestx2)
recode q114 (1=4) (2=3) (3=2) (4=1) (7=.) (8=.), gen(antiwestx4)
recode q117D (1=1) (2=1) (3=0) (4=0) (7=0) (8=0), gen(usnatothreatx2)
recode q117D (1=4) (2=3) (3=2) (4=1) (7=.) (8=.), gen(usnatothreatx4)
*People's view of Putin's position on West
recode q116 (1=1) (2=1) (3=0) (4=0) (6=0) (7=0) (8=0) (.=0), gen(puantiwestx2)
recode q116 (1=4) (2=3) (3=2) (4=1) (6=.) (7=.) (8=.) (.=.), gen(puantiwestx4)

*Controls
recode q137 (1=0) (2=0) (3=0) (4=0) (5=0) (6=1) (7=1) (8=1) (97=0) (98=0), gen(highedx2)
recode q135 (2=1) (1=0), gen(female)
recode q145 (1=0) (2=0) (3=0) (4=1) (5=1) (7=0) (8=0), gen(ecpocdownx2)
recode q144 (1=1) (2=1) (3=0) (4=0) (5=0) (6=0) (7=0) (97=0) (98=0), gen(poorx2)
*Variable "age" is already saved in the dataset, but is generated using the following code:
*generate age=2016-variabl03 if variabl04<=11 | variabl04==98
*replace age=2015-variabl03 if variabl04==12
*replace age=. if variabl03==98
generate russian=1 if qn138==1
replace russian=0 if russian==.
recode tnp (1=6) (2=5) (3=4) (4=3) (5=2) (6=1), gen(commsize)

*Summary regressions

svy: regress proputin antiwestx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin antiwestx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)

svy: regress proputin usnatothreatx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin usnatothreatx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)

svy: regress proputin puantiwestx2 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)
svy: regress proputin puantiwestx4 ecpocdownx2 poorx2 age female commsize russian highedx2
eststo: margins, dydx(*)


* Analysis for Table OA7

svy: regress proputin antiwestx2##usnatothreatx2 ecpocdownx2 poorx2 age female commsize russian highedx2



*************************************NEORUSS surveys 2013-14

use "MERGEDNEORUSSSURVEYS.dta", clear

* This analysis uses the publicly available NEORUSS survey data from both 2013 and 2014, beginning by merging the datasets using the following code, starting in the 2013 dataset:
*append using "NEORUSS2014DATASETNAME.dta", generate(year2014)

egen weight=rowtotal(weightto13 weightto14)
svyset region [pweight=weight]

*Create vars

generate putvot=1 if q20a==6
replace putvot=1 if Q20A==6
replace putvot=0 if putvot==.

generate antiwestx2=1 if q66==1 | q66==2
replace antiwestx2=1 if Q66==1 | Q66==2
replace antiwestx2=0 if antiwestx2==.

generate antiwestx4=4 if q66==1 | Q66==1
replace antiwestx4=3 if q66==2 | Q66==2
replace antiwestx4=2 if q66==3 | Q66==3
replace antiwestx4=1 if q66==4 | Q66==4

recode q75 (1=5) (2=4) (3=3) (4=2) (5=1) (97=.) (99=.), gen(ecpoc13)
recode Q75 (1=5) (2=4) (3=3) (4=2) (5=1) (7=.) (9=.), gen(ecpoc14)
egen ecpoc=rowtotal(ecpoc13 ecpoc14)
replace ecpoc=. if ecpoc==0
drop ecpoc13 ecpoc14
recode ecpoc (1=1) (2=1) (3=0) (4=0) (5=0) (.=0), gen(ecpocdownx2)

*Note: there is no poverty measure as is in the RES and Levada surveys, so instead this variable is created by coding "1" those people in the lowest two income categories on the 10-point scale that is in the NEORUSS surveys:

generate poorx2=1 if q76==1 | q76==2 | Q76==1 | Q76==2
replace poorx2=0 if poorx2==.

recode q1 (2=1) (1=0), gen(female13)
recode H114 (2=1) (1=0), gen(female14)
egen female=rowtotal(female13 female14)
drop female13 female14

*The following steps are necessary because the variable coded “age” in the 2014 dataset provided is really age group, broken into 5 categories, and these five categories are different from the categories of agegroup provided by ROMIR for 2013.*
drop age
generate age=q2
replace age=H214 if age==.

generate educ13=q3
generate educ14=H3
egen educ=rowtotal(educ13 educ14)
replace educ=. if educ==0
drop educ13 educ14
replace educ=. if H3==99
recode educ (1=0) (2=0) (3=0) (4=0) (5=1) (6=1) (7=1) (.=0), gen(highedx2)

generate russian=1 if q71==1
replace russian=1 if q72==1
replace russian=1 if Q7_1==1
replace russian=1 if Q7_2==1
replace russian=0 if russian==.

recode t13 (1=5) (2=4) (4=2) (5=1), gen(commsize13)
recode t14 (1=5) (2=4) (4=2) (5=1), gen(commsize14)
egen commsize=rowtotal(commsize13 commsize14)
replace commsize=. if commsize==0
drop commsize13 commsize14


*Summary regressions

generate proputin=putvot

svy: regress proputin antiwestx2 ecpocdownx2 poorx2 age female commsize russian highedx2 if year2014==1
eststo: margins, dydx(*)
svy: regress proputin antiwestx4 ecpocdownx2 poorx2 age female commsize russian highedx2 if year2014==1
eststo: margins, dydx(*)

svy: regress proputin antiwestx2 ecpocdownx2 poorx2 age female commsize russian highedx2 if year2014==0
eststo: margins, dydx(*)
svy: regress proputin antiwestx4 ecpocdownx2 poorx2 age female commsize russian highedx2 if year2014==0
eststo: margins, dydx(*)




********************* TABLE OA4 (Putin support index as DV, 2013-19 surveys)

esttab using FRregssummary2013to2019index20230817.rtf, compress b(%9.2f) se star(+ 0.1 * 0.05 ** 0.01) coeflabel(antiusx2 "Anti-US x2" antiusx4 "Anti-US x4" antiwestx2 "Anti-West x2" antiwestx4 "Anti-West x4" usnatothreatx2 "US-NATO threat x2" usnatothreatx4 "US-NATO threat x4" puantiwestx2 "Putin is anti-West x2" puantiwestx4 "Putin is anti-West x4" ecpocdownx2 "Pocketbook down" poorx2 "Poor" age "Age" female "Female" commsize "Community size" russian "Russian" highedx2 "Higher education") mtitles("2019" "2019" "RES2018" "RES2018" "RES2016" "RES2016" "RES2016" "RES2016" "RES2016" "RES2016" "Neoruss2014" "Neoruss2014" "Neoruss2013" "Neoruss2013") title("Table X. Average marginal effects of different aspects of anti-Westernism on probability of supporting Putin with economic and demographic controls, OLS") addnote("Dependent variables are indices of all measures of Putin support found in the given survey, constructed by converting each measure to a binary variable and averaging each individual's 'score' across these variables. Included measures of Putin support are: 2019 - support, job approval, attachment, and vote intention; 2018 - job approval and vote intention; 2016 - job approval, affective attachment, trust, vote intention, desire for Putin to remain president for life, positive emotions elicited by Putin, and perception Putin is the best politician to manage Russia's international interests; 2013 and 2014 - vote intention. The notation 'x2' refers to a measure of anti-Westernism that codes all people giving anti-Western responses as 1 and codes all others 0, while the notation 'x4' refers to a measure of anti-Westernism that consists of a four-point scale and that drops from the analysis all people who do not pick a number on this scale. The control variables for the economy, sex, nationality, and higher education are binary, coding people who hold the disposition 1 and coding all others 0. The control variable age reports respondents' age in years, and 'community size' consists of the scale supplied by each survey agency on the size of the population center where a respondent lives. All regressions are OLS, but using logit or ordinal logit produces no substantial difference. The same patterns are also found if one breaks down the indices into their component measures of Putin support.") fonttbl(\f0\fnil Times New Roman; ) replace 
eststo clear



********************************************************************************
******************************** PUTIN VOTE ONLY *******************************
********************************************************************************


* December 2021 (Refresh RES): Anti-Westernism, NATO Threat, and Putin Reputation

use "Data_Replication_HL24_IS_Dec2021.dta", clear

svyset qTO [pweight=wgt_refresh]

generate votput202112=1 if qG7==5
replace votput202112=0 if votput202112==.

recode qP16 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(antiwest202112x4)
qui: summarize antiwest202112x4, meanonly
qui: gen antiwest202112x4u=(antiwest202112x4-r(min))/(r(max)-r(min))

recode qN17B (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(usnatothreat202112x4)
qui: summarize usnatothreat202112x4, meanonly
qui: gen usnatothreat202112x4u=(usnatothreat202112x4-r(min))/(r(max)-r(min))

recode qP18 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(puantiwest202112x4)
qui: summarize puantiwest202112x4, meanonly
qui: gen puantiwest202112x4u=(puantiwest202112x4-r(min))/(r(max)-r(min))

svy: regress votput202112 antiwest202112x4u
estimates store result202112west
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}a. Dec. 2021, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig202112antiwestsimple20230817, replace)

svy: regress votput202112 usnatothreat202112x4u
estimates store result202112nato
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}a. Dec. 2021, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig202112usnatosimple20230817, replace)

svy: regress votput202112 puantiwest202112x4u
estimates store result202112puwest
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}a. Dec. 2021, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig202112puantiwestsimple20230817, replace)



* Summer 2021 (RES Wave 1): : Anti-Westernism, NATO Threat

use "Data_Replication_HL24_IS_Sep2021.dta", clear

svyset qTO [pweight=wgt_wave1]

generate votput202109=1 if q39==6
replace votput202109=0 if votput202109==.

recode q51 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(antiwest202109x4)
qui: summarize antiwest202109x4, meanonly
qui: gen antiwest202109x4u=(antiwest202109x4-r(min))/(r(max)-r(min))

recode q55_2 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(usnatothreat202109x4)
qui: summarize usnatothreat202109x4, meanonly
qui: gen usnatothreat202109x4u=(usnatothreat202109x4-r(min))/(r(max)-r(min))

svy: regress votput202109 antiwest202109x4u
estimates store result202109west
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}b. Sep. 2021, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig202109antiwestsimple20230817, replace)

svy: regress votput202109 usnatothreat202109x4u
estimates store result202109nato
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}b. Sep. 2021, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig202109usnatosimple20230817, replace)



* 2019: Anti-Americanism

use "Data-Levada-Omnibus-201907-20190730.dta", clear

svyset psu [pweight=weight]

generate votput19=1 if qQ10_cod==7
replace votput19=0 if votput19==.

recode qH3 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(antiusx4)
qui: summarize antiusx4, meanonly
qui: gen antius2019x4u=(antiusx4-r(min))/(r(max)-r(min))

svy: regress votput19 antius2019x4u
estimates store result2019us
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}c. 2019 [anti-US], size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2019antiussimple20230817, replace)



* 2018: Anti-Westernism

use "Data_Replication_HL24_IS_RES_2018.dta", replace

svyset qTO [pweight=qVEC]

generate votput18=1 if qD1B==4
replace votput18=0 if votput18==.

recode qQ3 (1=4) (2=3) (3=2) (4=1) (8=.) (9=.), gen(antiwest2018x4)
qui: summarize antiwest2018x4, meanonly
qui: gen antiwest2018x4u=(antiwest2018x4-r(min))/(r(max)-r(min))

svy: regress votput18 antiwest2018x4u
estimates store result2018west
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}d. 2018, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2018antiwestsimple20230817, replace)



* 2016: Anti-Westernism, NATO threat, and Putin Reputation

use "Data_Replication_HL24_IS_RES_2016.dta.dta", replace

svyset qTO [pweight=vec]

generate votput16=1 if q97==6
replace votput16=0 if votput16==.

recode q114 (1=4) (2=3) (3=2) (4=1) (7=.) (8=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwest2016x4u=(antiwestx4-r(min))/(r(max)-r(min))

recode q117D (1=4) (2=3) (3=2) (4=1) (7=.) (8=.), gen(usnatothreatx4)
qui: summarize usnatothreatx4, meanonly
qui: gen usnatothreat2016x4u=(usnatothreatx4-r(min))/(r(max)-r(min))

recode q116 (1=4) (2=3) (3=2) (4=1) (6=.) (7=.) (8=.) (.=.), gen(puantiwestx4)
qui: summarize puantiwestx4, meanonly
qui: gen puantiwest2016x4u=(puantiwestx4-r(min))/(r(max)-r(min))

svy: regress votput16 antiwest2016x4u
estimates store result2016west
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}e. 2016, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2016antiwestsimple20230817, replace)

svy: regress votput16 usnatothreat2016x4u
estimates store result2016nato
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}c. 2016, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2016usnatosimple20230817, replace)

svy: regress votput16 puantiwest2016x4u
estimates store result2016puwest
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}b. 2016, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2016puantiwestsimple20230817, replace)



* NEORUSS surveys 2013-14

use "MERGEDNEORUSSSURVEYS.dta", clear

* This analysis uses the publicly available NEORUSS survey data from both 2013 and 2014, beginning by merging the datasets using the following code, starting in the 2013 dataset:
*append using "NEORUSS2014DATASETNAME.dta", generate(year2014)

egen weight=rowtotal(weightto13 weightto14)
svyset region [pweight=weight]

generate putvot=1 if q20a==6
replace putvot=1 if Q20A==6
replace putvot=0 if putvot==.

recode q66 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(antiwest2013x4)
qui: summarize antiwest2013x4, meanonly
qui: gen antiwest2013x4u=(antiwest2013x4-r(min))/(r(max)-r(min))

recode Q66 (1=4) (2=3) (3=2) (4=1) (7=.) (9=.), gen(antiwest2014x4)
qui: summarize antiwest2014x4, meanonly
qui: gen antiwest2014x4u=(antiwest2014x4-r(min))/(r(max)-r(min))

*2014
svy: regress putvot antiwest2014x4u
estimates store result2014west
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}f. 2014, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2014antiwestsimple20230817, replace)

*2013
svy: regress putvot antiwest2013x4u
estimates store result2013west
eststo: margins, dydx(*) post vce(unconditional)
marginsplot, allxlabels yline(0) ylabel(-.5 "-50%" 0 "0" .5 "50%",angle(horizontal) labsize(medlarge))  xlabel (1 "") recast(scatter) title({bf}g. 2013, size(large) color(black) span) xtitle("") ytitle("") xscale(range(.75 1.25)) graphr(color(white)) saving(FRfig2013antiwestsimple20230817, replace)


* GRAPHS

* Figure 1

coefplot result2016nato result202109nato result202112nato, nokey xline(0, lcolor(black)) drop(_cons) mcolor(black) ciopts(color(black)) byopts(yrescale) xlabel (-.5 "-.5" 0 "0" .5 ".5") recast(scatter) title("{bf:Full effects of perceiving US-NATO threat on likelihood of voting}" "{bf:for Putin in three surveys of Russian population 2013-2021}", size(medlarge) color(black) span) xtitle("Likelihood") ytitle("") xscale(range(-.5 .5)) graphr(color(white)) coeflabels(usnatothreat2016x4u = "2016" usnatothreat202109x4u = "September 2021" usnatothreat202112x4u = "December 2021") yscale(range(.5 3.5)) offset(0) saving(FRfigcoefplotnato20240603, replace)

* Figure 2

coefplot result2013west result2014west result2016west result2018west result2019us result202109west result202112west, nokey xline(0, lcolor(black)) drop(_cons) mcolor(black) ciopts(color(black)) byopts(yrescale) xlabel (-.5 "-.5" 0 "0" .5 ".5") recast(scatter) title("{bf:Full effects of anti-Westernism on likelihood of voting}" "{bf:for Putin in seven surveys of Russian population 2013-2021}", size(medlarge) color(black) span) xtitle("Likelihood") ytitle("") xscale(range(-.5 .5)) graphr(color(white)) coeflabels(antiwest2013x4u = "2013" antiwest2014x4u = "2014" antiwest2016x4u = "2016" antiwest2018x4u = "2018" antius2019x4u = "2019 (US)" antiwest202109x4u = "September 2021" antiwest202112x4u = "December 2021") yscale(range(.5 7.5)) offset(0) saving(FRfigcoefplotwest20240603, replace)

* Figure 3

coefplot result2016puwest result202112puwest, nokey xline(0, lcolor(black)) drop(_cons) ciopts(color(black)) mcolor(black) byopts(yrescale) xlabel (-.5 "-.5" 0 "0" .5 ".5") recast(scatter) title("{bf:Full effects of believing Putin is anti-Western on likelihood of}" "{bf:voting for him in two surveys of Russian population 2013-2021}", size(medlarge) color(black) span) xtitle("Likelihood") ytitle("") xscale(range(-.5 .5)) graphr(color(white)) coeflabels(puantiwest2016x4u = "2016" puantiwest202112x4u = "December 2021") yscale(range(.5 2.5)) offset(0) saving(FRfigcoefplotpuwest20240603, replace)



***** TABLES for Figures 1-3


* TABLE OA2 (Figure 2): Anti-Westernism

eststo clear

* December 2021 (Refresh RES): Anti-Westernism, NATO Threat, and Putin Reputation

use "Data_Replication_HL24_IS_Dec2021.dta", clear

svyset qTO [pweight=wgt_refresh]

generate votput202112=1 if qG7==5
replace votput202112=0 if votput202112==.

recode qP16 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwestx4u=(antiwestx4-r(min))/(r(max)-r(min))

svy: regress votput202112 antiwestx4u
eststo: margins, dydx(*) post vce(unconditional)


* Summer 2021 (RES Wave 1): : Anti-Westernism, NATO Threat

use "Data_Replication_HL24_IS_Sep2021.dta", clear

svyset qTO [pweight=wgt_wave1]

generate votput202109=1 if q39==6
replace votput202109=0 if votput202109==.

recode q51 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwestx4u=(antiwestx4-r(min))/(r(max)-r(min))

svy: regress votput202109 antiwestx4u
eststo: margins, dydx(*) post vce(unconditional)


* 2019: Anti-Americanism

use "Data-Levada-Omnibus-201907-20190730.dta", clear

svyset psu [pweight=weight]

*Create vars

*DV
generate votput19=1 if qQ10_cod==7
replace votput19=0 if votput19==.

*IV
recode qH3 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(antiusx4)
qui: summarize antiusx4, meanonly
qui: gen antiusx4u=(antiusx4-r(min))/(r(max)-r(min))

svy: regress votput19 antiusx4u
eststo: margins, dydx(*) post vce(unconditional)


* 2018: Anti-Westernism

use "Data_Replication_HL24_IS_RES_2018.dta", replace

svyset qTO [pweight=qVEC]

*Create vars

*DV
generate votput18=1 if qD1B==4
replace votput18=0 if votput18==.

*IV
recode qQ3 (1=4) (2=3) (3=2) (4=1) (8=.) (9=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwestx4u=(antiwestx4-r(min))/(r(max)-r(min))

svy: regress votput18 antiwestx4u
eststo: margins, dydx(*) post vce(unconditional)


* 2016: Anti-Westernism, NATO threat, and Putin Reputation

use "Data_Replication_HL24_IS_RES_2016.dta.dta", replace

svyset qTO [pweight=vec]

*DV
generate votput16=1 if q97==6
replace votput16=0 if votput16==.

*IV’s
recode q114 (1=4) (2=3) (3=2) (4=1) (7=.) (8=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwestx4u=(antiwestx4-r(min))/(r(max)-r(min))

svy: regress votput16 antiwestx4u
eststo: margins, dydx(*) post vce(unconditional)


* NEORUSS surveys 2013-14

use "Data NEORUSS Survey Merged 2013-14 - 20190426.dta", clear

*The two NEORUSS datasets (2013 and 2014) must first be merged. Starting in the 2013 dataset, do the following:
*append using "C:\Users\hehal\Documents\Writing Projects\NEORUSS - Kolsto project\Data - NEORUSS Survey Merged 2013-14\Data NEORUSS Survey 2014 for merger.dta", generate(year2014)

*egen weight=rowtotal(weightto13 weightto14)
svyset region [pweight=weight]

*Create vars

*generate putvot=1 if q20a==6
*replace putvot=1 if Q20A==6
*replace putvot=0 if putvot==.

*2014
recode Q66 (1=4) (2=3) (3=2) (4=1) (7=.) (9=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwestx4u=(antiwestx4-r(min))/(r(max)-r(min))

svy: regress putvot antiwestx4u
eststo: margins, dydx(*) post vce(unconditional)

*2013
drop antiwestx4u antiwestx4

recode q66 (1=4) (2=3) (3=2) (4=1) (97=.) (99=.), gen(antiwestx4)
qui: summarize antiwestx4, meanonly
qui: gen antiwestx4u=(antiwestx4-r(min))/(r(max)-r(min))

svy: regress putvot antiwestx4u
eststo: margins, dydx(*) post vce(unconditional)


* Table OA2
esttab using FRtabregsmainantiwest20230817.rtf, compress b(%9.2f) star(+ .1 * 0.05 ** 0.01) se coeflabel(antiwestx4u "Anti-Western" antiusx4u "Anti-American") mtitles("Dec 2021" "Sep 2021" "2019 [US]" "2018" "2016" "2014" "2013") title("Full effects of anti-Westernism on likelihood of voting for Putin, simple bivariate OLS model, with robust standard errors and weighting to population") fonttbl(\f0\fnil Times New Roman; ) replace 

eststo clear



************ TABLE OA1 (Figure 1): US-NATO threat

eststo clear

* December 2021 (Refresh RES)

use "Data_Replication_HL24_IS_Dec2021.dta", clear

svyset qTO [pweight=wgt_refresh]

generate votput202112=1 if qG7==5
replace votput202112=0 if votput202112==.

recode qN17B (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(usnatothreatx4)
qui: summarize usnatothreatx4, meanonly
qui: gen usnatothreatx4u=(usnatothreatx4-r(min))/(r(max)-r(min))

svy: regress votput202112 usnatothreatx4u
eststo: margins, dydx(*) post vce(unconditional)


* Summer 2021 (RES Wave 1)

use "Data_Replication_HL24_IS_Sep2021.dta", clear

svyset qTO [pweight=wgt_wave1]

generate votput202109=1 if q39==6
replace votput202109=0 if votput202109==.

recode q55_2 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(usnatothreatx4)
qui: summarize usnatothreatx4, meanonly
qui: gen usnatothreatx4u=(usnatothreatx4-r(min))/(r(max)-r(min))

svy: regress votput202109 usnatothreatx4u
eststo: margins, dydx(*) post vce(unconditional)


* 2016: Anti-Westernism, NATO threat, and Putin Reputation

use "Data_Replication_HL24_IS_RES_2016.dta.dta", replace

svyset qTO [pweight=vec]

generate votput16=1 if q97==6
replace votput16=0 if votput16==.

recode q117D (1=4) (2=3) (3=2) (4=1) (7=.) (8=.), gen(usnatothreatx4)
qui: summarize usnatothreatx4, meanonly
qui: gen usnatothreatx4u=(usnatothreatx4-r(min))/(r(max)-r(min))

svy: regress votput16 usnatothreatx4u
eststo: margins, dydx(*) post vce(unconditional)

* Table OA1

esttab using FRtabregsmainnato20230817.rtf, compress b(%9.2f) star(+ .1 * 0.05 ** 0.01) se coeflabel(usnatothreatx4u "Belief US-NATO are threat") mtitles("Dec 2021" "Sep 2021" "2016") title("Full effects of perceiving a threat from the US and NATO on likelihood of voting for Putin, simple bivariate OLS model, with robust standard errors and weighting to population") fonttbl(\f0\fnil Times New Roman; ) replace 

eststo clear


********** TABLE OA3 (Figure 3): Perceptions of Putin's Position

eststo clear

* December 2021 (Refresh RES)

use "Data_Replication_HL24_IS_Dec2021.dta", clear

svyset qTO [pweight=wgt_refresh]

generate votput202112=1 if qG7==5
replace votput202112=0 if votput202112==.

recode qP18 (1=4) (2=3) (3=2) (4=1) (98=.) (99=.), gen(puantiwestx4)
qui: summarize puantiwestx4, meanonly
qui: gen puantiwestx4u=(puantiwestx4-r(min))/(r(max)-r(min))

svy: regress votput202112 puantiwestx4u
eststo: margins, dydx(*) post vce(unconditional)

* 2016: Anti-Westernism, NATO threat, and Putin Reputation

use "Data_Replication_HL24_IS_RES_2016.dta.dta", replace

svyset qTO [pweight=vec]

generate votput16=1 if q97==6
replace votput16=0 if votput16==.

recode q116 (1=4) (2=3) (3=2) (4=1) (6=.) (7=.) (8=.) (.=.), gen(puantiwestx4)
qui: summarize puantiwestx4, meanonly
qui: gen puantiwestx4u=(puantiwestx4-r(min))/(r(max)-r(min))

svy: regress votput16 puantiwestx4u
eststo: margins, dydx(*) post vce(unconditional)

* Table OA3

esttab using FRtabregsmainpuwest20230817.rtf, compress b(%9.2f) star(+ .1 * 0.05 ** 0.01) se coeflabel(puantiwestx4u "Belief Putin is anti-Western") mtitles("Dec 2021" "2016") title("Full effects of believing Putin is anti-Western on likelihood of voting for him, simple bivariate OLS model, with robust standard errors and weighting to population") fonttbl(\f0\fnil Times New Roman; ) replace 

eststo clear



